﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CircleWindow
{
    public class MainViewModel : NotifyPropertyChanged
    {
        private ObservableCollection<ModuleShowClass> _moduleCollection = new ObservableCollection<ModuleShowClass>();
        public ObservableCollection<ModuleShowClass> ModuleCollection
        {
            get { return _moduleCollection; }
            set
            {
                _moduleCollection = value;
                RaisePropertyChanged(nameof(ModuleCollection));
            }
        }

        public MainViewModel() 
        {
            ObservableCollection<ModuleShowClass> tempCollection = new ObservableCollection<ModuleShowClass>();

            tempCollection.Add(new ModuleShowClass(ModuleType.DBConfig, "配置库"));
            tempCollection.Add(new ModuleShowClass(ModuleType.DB, "数据库"));
            tempCollection.Add(new ModuleShowClass(ModuleType.BLL, "业务"));
            tempCollection.Add(new ModuleShowClass(ModuleType.Track, "地控"));
            tempCollection.Add(new ModuleShowClass(ModuleType.Feeder, "供包台"));
            tempCollection.Add(new ModuleShowClass(ModuleType.Chute, "下料口"));
            tempCollection.Add(new ModuleShowClass(ModuleType.Camera, "相机"));
            tempCollection.Add(new ModuleShowClass(ModuleType.PLC, "PLC"));
            tempCollection.Add(new ModuleShowClass(ModuleType.Manual, "补码"));
            tempCollection.Add(new ModuleShowClass(ModuleType.GrayCamera, "灰度仪"));
            tempCollection.Add(new ModuleShowClass(ModuleType.Car, "车载"));
            ModuleCollection = tempCollection;
        }
    }
}
